package com.api.oa.services;

import com.api.oa.model.entity.OaNotice;
import com.api.oa.model.entity.OaOrg;
import com.api.oa.model.entity.OaRelation;
import com.api.oa.model.vo.OaNoticeVo;
import com.api.oa.model.vo.OaRelationVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IOaOrgNoticeService {


    /**
     * 下发通知
     * @param oaOrg
     * @return
     */
    OaNotice add(OaNotice oaOrg) throws Exception;


    void remove(Long id);


    Integer update(OaNotice org);



    /**
     * 发布机构
     * @return
     */
    PageInfo<OaNotice> listFrom(String userId,Long type,Integer pageNo,Integer pageSize);

    /**
     * 发布者查看收到通知情况
     * @param noticeId
     * @return
     */
    PageInfo<OaRelationVO>  listUnderNotice(Long noticeId,Integer pageNo,Integer pageSize);


    /**
     * 查看通知详情
     * @param id
     * @return
     */
    OaNotice one(Long id);

    /**
     * 接受通知
     * @param uid
     * @return
     */
    PageInfo<OaNoticeVo> listTo(String uid, Integer isRead,Integer pageIndex,Integer pageSize);


    /**
     * 设置已读
     * @param id
     */
    void readNotice(Long id);


    /**
     * 回复文档
     * @param id
     * @param fileId
     * @return
     */
    Integer noticeReplay(Long id, Long fileId);
}
